const {
	result_success,
	result_error
} = require('http-result-modle')
const {
	getCommonTime,
	getFullTime
} = require('api-time')
const {
	getUuid
} = require('common-uuid')
const db = uniCloud.database()
const dbCmd = db.command
const $ = dbCmd.aggregate;
const userCollectionName = 'uni-id-users'
const userCollection = db.collection(userCollectionName)
const appletInfoCollectionName = 'wmz-applet-info'
const appletInfoCollection = db.collection(appletInfoCollectionName)
const shopieCollectionName = 'wmzmall-shopie'
const shopieCollection = db.collection(shopieCollectionName)
const shopieReportCollectionName = 'wmzmall-shopie-report'
const shopieReportCollection = db.collection(shopieReportCollectionName)
const shopieUserReportCollectionName = 'wmzmall-shopie-user-report'
const shopieUserReportCollection = db.collection(shopieUserReportCollectionName)
const shopieMonthReportCollectionName = 'wmzmall-shopie-month-report'
const shopieMonthReportCollection = db.collection(shopieMonthReportCollectionName)
const shopieUserMonthReportCollectionName = 'wmzmall-shopie-u-month-report'
const shopieUserMonthReportCollection = db.collection(shopieUserMonthReportCollectionName)
const collectionCollectionName = 'wmzmall-collection'
const collectionCollection = db.collection(collectionCollectionName)
const memberCollectionName = 'wmzmall-member'
const memberCollection = db.collection(memberCollectionName)

module.exports = {
	result_success,
	result_error,
	db,
	dbCmd,
	$,
	userCollectionName,
	userCollection,
	appletInfoCollectionName,
	appletInfoCollection,
	shopieCollectionName,
	shopieCollection,
	memberCollectionName,
	memberCollection,
	collectionCollectionName,
	collectionCollection,
	shopieReportCollectionName,
	shopieReportCollection,
	shopieUserReportCollectionName,
	shopieUserReportCollection,
	shopieMonthReportCollection,
	shopieUserMonthReportCollection,
	getUuid,
	getCommonTime,
	getFullTime
}